package edu.mse.camel.client.whiteboard.collaboration;

import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.gef.DefaultEditDomain;
import org.eclipse.gef.commands.CommandStack;
import org.eclipse.gef.commands.CommandStackEvent;
import org.eclipse.gef.commands.CommandStackEventListener;
import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack;

public class WB_CommandStackEventListener implements CommandStackEventListener {
	
	private CommandStack originalCommandStack;
	private ResourceSet root;
	private volatile boolean shouldRecord = true;
	private int tokenID;
	
	public WB_CommandStackEventListener (DefaultEditDomain editDomain, ResourceSet resourceSet, int tokenID) {
		this.originalCommandStack = editDomain.getCommandStack();
		this.root = resourceSet;
		this.tokenID = tokenID;
	}
	
	@Override
	public void stackChanged(CommandStackEvent event) {
		// TODO Auto-generated method stub
		System.out.println ( "Event : " + event);
	}

	public boolean isShouldRecord() {
		return shouldRecord;
	}

	public void setShouldRecord(boolean shouldRecord) {
		this.shouldRecord = shouldRecord;
	}

	public int getTokenID() {
		return tokenID;
	}

	public void setTokenID(int tokenID) {
		this.tokenID = tokenID;
	}

}
